package com.shangyitong.yygh_hosp.controller;

import com.shangyitong.Result;
import com.shangyitong.yygh.model.hosp.Department;
import com.shangyitong.yygh.vo.hosp.DepartmentVo;
import com.shangyitong.yygh_hosp.service.DepartmentService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Slf4j
@RequestMapping("/admin/hosp/department")
public class DepartmentController {
    @Autowired
    private DepartmentService departmentService;
    /**
     * 查看医院科室
     * finished
     * @param hoscode
     * @return
     */
    @ApiOperation(value = "查看医院科室")
    @GetMapping("getDeptList/{hoscode}")
    public Result getDeptList(@PathVariable String hoscode){
        List<DepartmentVo> departmentVos = departmentService.getDeptList(hoscode);
        return Result.ok(departmentVos);
    }
}
